


import * as React from 'react';
import { Layers, Refresh, Plus, Minus, Radar } from '@icon-park/react';
import { makeClassNameList } from '../utils';
import SmartMapProvider from '../provider/SmartMapProvider';


const SmartMapLayerUtilsBtn = () => {
    const {
        layerManageDrawerOpen,
        setLayerManageDrawerOpen,
        zoom,
        handleSetMapZoom
    } = React.useContext(SmartMapProvider);

    const switchMapLayerManageDrawerOpen = () => {
        setLayerManageDrawerOpen(!layerManageDrawerOpen);
    }
    
    return (
        <div
            className='map-tool-btn-container'
            style={{
                top: 12,
                left: 12,
            }}
        >
            <div
                className={
                    makeClassNameList(['flex-col map-tool-btn', layerManageDrawerOpen ? 'active' : null])
                }
                onClick={switchMapLayerManageDrawerOpen}
            >
                <Layers
                    theme={'outline'}
                    size="20"
                    fill="#333"
                    strokeWidth={3}
                />
            </div>
        </div>
    )
}


export default SmartMapLayerUtilsBtn;